<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3-9 Vue中的set方法</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="app">

        <div v-for="(item,key,index) of userinfo">
            {{item}} -- {{key}} -- {{index}}
        </div>

        <div v-for="item in list">
            {{item}}
        </div>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                userinfo: {
                    name: "yukai",
                    age: 18,
                    gender: "男"
                },
                list: [1, 3, 5, 7]

            }
        })
    </script>
</body>

</html>